/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-04-29 16:37:56
 * @LastEditTime: 2022-04-30 15:48:01
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description: 
 */
import React, { Component } from 'react'
import { Route, Switch, Redirect } from 'react-router-dom'

import MyNavLink from './components/MyNavLink'

import Header from './components/Header'
import About from './page/About'
import Home from './page/Home'

export default class App extends Component {
  render() {
    return (
      <div>
    <Header></Header>
        <div className="row">
          <div className="col-xs-2 col-xs-offset-2">
            <div className="list-group">
              <MyNavLink to='/home' >Home</MyNavLink>
              <MyNavLink to='/about'>About</MyNavLink>
            </div>
          </div>
          <div className="col-xs-6">
            <div className="panel">
              <div className="panel-body">
                <Switch>
                  <Route path='/home' component={Home}></Route>
                  <Route exact path='/about' component={About}></Route>
                  <Redirect to='/home'></Redirect>
                </Switch>
              </div>
            </div>
          </div>
        </div>
      </div>
    )
  }
}
